import { S } from '../../s';
import { IPSAppDEView } from '../../app/view/ipsapp-deview';
import { IPSNavigateContext } from '../ipsnavigate-context';
import { IPSNavigateParam } from '../ipsnavigate-param';
import { PSControlImpl } from '../pscontrol-impl';
import { IPSDEViewPanel } from './ipsdeview-panel';
import { IPSLanguageRes } from '../../res/ipslanguage-res';

export class PSDEViewPanelImpl extends PSControlImpl implements IPSDEViewPanel {
  protected cappslanguageres: IPSLanguageRes;
  getCapPSLanguageRes(): IPSLanguageRes | null {
    return (
      this.cappslanguageres ||
      (this.cappslanguageres = this.fillObjectModel(
        S._276,
        this.M.getCapPSLanguageRes,
        S._2a8,
      ) as IPSLanguageRes)
    );
  }

  get caption(): string {
    return this.M.caption;
  }

  protected embeddedpsappdeview: IPSAppDEView;
  getEmbeddedPSAppDEView(): IPSAppDEView | null {
    return (
      this.embeddedpsappdeview ||
      (this.embeddedpsappdeview = this.fillObjectModel(
        S._20,
        this.M.getEmbeddedPSAppDEView,
        S._360,
      ) as IPSAppDEView)
    );
  }

  protected psnavigatecontexts: IPSNavigateContext[];
  getPSNavigateContexts(): IPSNavigateContext[] | null {
    return (
      this.psnavigatecontexts ||
      (this.psnavigatecontexts = this.fillChildListModel(
        this.M.getPSNavigateContexts,
        S._8c,
      ) as IPSNavigateContext[])
    );
  }

  findPSNavigateContext(objKey: any): IPSNavigateContext | null {
    return this.getPSModel5(
      S._8c,
      this.getPSNavigateContexts(),
      objKey,
    ) as IPSNavigateContext;
  }

  protected psnavigateparams: IPSNavigateParam[];
  getPSNavigateParams(): IPSNavigateParam[] | null {
    return (
      this.psnavigateparams ||
      (this.psnavigateparams = this.fillChildListModel(
        this.M.getPSNavigateParams,
        S._8a,
      ) as IPSNavigateParam[])
    );
  }

  findPSNavigateParam(objKey: any): IPSNavigateParam | null {
    return this.getPSModel5(
      S._8a,
      this.getPSNavigateParams(),
      objKey,
    ) as IPSNavigateParam;
  }
  get cls(): string {
    return 'PSDEViewPanelImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._7 || cls == S._267) return true;
    return super.instanceof(cls);
  }
}
